<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link rel="stylesheet" type="text/css" href="/books/css/list.css"/>
    <script type="text/javascript" src="/books/js/jquery.1.9.1.js" ></script>
    <script type="text/javascript" src="/books/js/mobileSelect.js"></script>
	<link rel="stylesheet" type="text/css" href="/books/css/mobileSelect.css"/>
	<script type="text/javascript" src="/books/js/rem.js" ></script>
    <title>分公司现金日记账</title>
</head>
<body>
<div class="container">
	<div class="listtop">
		<div class="top_con1">
			<p class="year">{$info.year}年</p>
			<div>
				<div  style="display: inline-block;">
					第{$info.week_text}周
				</div>
				 <input type="hidden" name="" id="week" value="" />								
			</div>
		</div>
		<div class="top_con2">
			<p>收入</p>
			<p>{$info.income_text}</p>
		</div>
		<div class="top_con3">
			<p>支出</p>
			<p>{$info.expenses_text}</p>
		</div>	
		<div class="top_con3">
			<p>结余</p>
			<p>{$info.balance_text}</p>
		</div>
	</div>
	<?php if(!empty($Books)){?>
			
	<ul class="list">
		<?php foreach($Books as $k=>$v){?>

		<li>
			<div class="title">
				<p><?php echo $v['time'],' ',$v['week'];?></p>
				<p>
					<span class="shou">收入</span> <?php echo $v['income']?:'0.00';?><br />
					<span class="chu">支出</span> <?php echo $v['expenditure']?:'0.00';?>
					
				</p>
			</div>
			<?php if(isset($v['Books_view'])){?>
				<div class="info">
				 <?php foreach($v['Books_view'] as $vv){?>
					<p> 
						{if $books_auth['edit'] && ($books_auth['department'] == $info['department'])}
							<a href="/index/books/edit/ids/{$vv.id}/id/{$ids}">
						{else}
							<a href="javascript:;">
						{/if}
						<?php echo !empty($vv['cost_id']) && $vv['pay_type'] == 2 ? TableField('Cost','name',$vv['cost_id']) : '备用金';?>
						<?php if($vv['pay_type'] == 1){ ?>
							<span><?php echo $vv['price'];?></span>
						<?php }else{ ?>
						   <span>-<?php echo $vv['price'];?></span>
						<?php }?>
							</a>
					</p>
			
				  <?php } ?>
				
				</div>
			<?php } ?>
		</li>
		<?php }?>
	</ul>
	 <?php }?>
	 	{if $books_auth['add'] && ($books_auth['department'] == $info['department'])}
			<a href="/index/books/add/ids/{$ids}" class="addbutton">新增</a>
		{/if}
</div>
</body>

</html>
